
package com.plian.system.service.fr.payrolladjustment.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.plian.system.entity.fr.payrolladjustment.PayrollAdjustmentColumn;
import com.plian.system.mapper.fr.payrolladjustment.PayrollAdjustmentColumnMapper;
import com.plian.system.service.fr.payrolladjustment.IPayrollAdjustmentColumnService;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * 工资预算表列定义表 服务实现类
 *
 * @author jianglei
 * @since 2023-05-05
 */
@Service
@AllArgsConstructor
public class PayrollAdjustmentColumnServiceImpl extends ServiceImpl<PayrollAdjustmentColumnMapper, PayrollAdjustmentColumn> implements IPayrollAdjustmentColumnService {
    /**
     * logger属性.
     */
    private static final Logger LOGGER  = LoggerFactory.getLogger(PayrollAdjustmentColumnServiceImpl.class);


    @Override
    public String columnNumberToColumnId(int columnNumber, String sheetId) {
        PayrollAdjustmentColumn payrollAdjustmentColumn = getOne(Wrappers.<PayrollAdjustmentColumn>lambdaQuery()
                .eq(PayrollAdjustmentColumn::getOrgId, sheetId).eq(PayrollAdjustmentColumn::getOrderNumber, columnNumber));
        if (payrollAdjustmentColumn != null){
            return payrollAdjustmentColumn.getColumnId();
        }
        return null;
    }
}
